//
//  BDHomeCellContentView.m
//  BadBoy
//
//  Created by wen on 2017/3/13.
//  Copyright © 2017年 com.8xiong. All rights reserved.
//

#import "BDHomeCellContentView.h"

//[UIColor colorWithRed:245 / 255.0 green:245 / 255.0 blue:245 / 255.0 alpha:1]
@implementation BDHomeCellContentView

+ (CGFloat)getHeightWithModel:(id)model{
    if ([model isKindOfClass:[NSArray class]]) {
        NSArray *arr = model;
        if (arr.count == 0) {
            return 0;
        }
        if (arr.count == 1) {
            return 150 + 10;
        }
        CGFloat side = 10;
        CGFloat space = 5;
        CGFloat photoWidth = ([UIScreen mainScreen].bounds.size.width - space * 2 - side * 2) / 3.0;
        return (space + photoWidth) * (arr.count / 3 + 1) + 10;
    }
    return 0;
}

@end
